﻿
//-----------------------------------------------------------------------
// <copyright file="UserSearch.aspx.cs" company="Howonder">
//     Copyright © Howonder 2015. All rights reserved.
// </copyright>
// <author>Qian Zhao</author>
// <summary></summary>
//-----------------------------------------------------------------------

namespace HSNet.Presentation.Web.Examples.Pages
{
    using HSNet.Application.Core;
    using HSNet.Application.Examples.IAppService;
    using HSNet.Domain.Examples.DTO;
    using HSNet.Domain.Examples.Entity;

    /// <summary>
    /// <para>程序名称：用户维护搜索页</para>
    /// <para>功能描述：搜索用户维护信息</para>
    /// <list type="table">
    /// <listheader> 
    ///   <term>作者</term><term>日期</term><term>版本</term><description>变更说明</description>
    /// </listheader>
    /// </list>
    /// </summary>
    public partial class UserSearch : HSNetPageSearch<User, UserDTO>
    {
        /// <summary>
        /// 依赖注入（用于调取UserAppService）
        /// </summary>
        private readonly IUserAppService userAppService =
                    HSNetWebApp.Container.Resolve<IUserAppService>();

        #region 根据依赖注入获取对应的App应用服务
        /// <summary>
        /// 根据依赖注入获取对应的App应用服务
        /// </summary>
        protected override IAppService<User, UserDTO> AppService
        {
            get { return this.userAppService; }
        }
        #endregion

        #region 页面初始化
        /// <summary>
        /// 页面初始化
        /// </summary>
        protected override void HSSetPageDefault()
        {
            // 绑定状态下拉列表框
            this.cmbStatus.HSBoundListItems<UserStatus>();
        }
        #endregion
    }
}